/*
using MyGeneration/Template/NHibernate (c) by lujan99@usa.net
*/
using System;
using System.Collections;
using System.Collections.Generic;

namespace OpenGado.DATA.Entities
{
	/// <summary>
	/// RequestItemId object for NHibernate mapped table 'request_item'.
	/// </summary>
	[Serializable]
	public class RequestItemId
	{
		#region Member Variables
		protected int _requestitemid;
		protected RequestHeader _requestheader;
		#endregion
		#region Constructors
			
		public RequestItemId() {}
					
		public RequestItemId(RequestHeader requestheader) 
		{
			this._requestheader= requestheader;
		}

		#endregion
		#region Public Properties
		public  virtual int RequestItemId
		{
			get { return _requestitemid; }
			set {_requestitemid= value; }
		}
		public  virtual RequestHeader RequestHeader
		{
			get { return _requestheader; }
			set {_requestheader= value; }
		}
		#endregion
		
		#region Equals And HashCode Overrides
		/// <summary>
		/// local implementation of Equals based on unique value members
		/// </summary>
		public override bool Equals( object obj )
		{
			if( this == obj ) return true;
			if( ( obj == null ) || ( obj.GetType() != this.GetType() ) ) return false;
			RequestItemId castObj = (RequestItemId)obj;
			return ( castObj != null ) &&
			this._requestitemid == castObj.RequestItemId &&
			this._requestheader.Equals( castObj.RequestHeader);
		}
		/// <summary>
		/// local implementation of GetHashCode based on unique value members
		/// </summary>
		public override int GetHashCode()
		{
			int hash = 57;
			hash = 27 * hash * _requestitemid.GetHashCode();
			hash = 27 * hash * _requestheader.GetHashCode();
			return hash;
		}
		#endregion
		
	}
}
